#ifndef MYTOOLS_H
#define MYTOOLS_H

#include <string>
#include <pthreads/pthread.h>

class MyTools
{
public:
    ~MyTools();

    void Log(std::string str);

    static MyTools *getInstance()
    {
        if (!MyTools::mInstance)
            MyTools::mInstance = new MyTools;
        return MyTools::mInstance;
    }
private:
    pthread_mutex_t mMutex;
    static MyTools *mInstance;
    MyTools();
};

#define MY MyTools::getInstance()

#endif // MYTOOLS_H
